#{extends 'main.html' /}  #{set title:'CoolSoft- Event' /}
#{if event.sprint}
<h2>
	<a style ="color:#400040;" href=" @{Projects.showProject(event.sprint.project.getEntityId())}">${event.sprint.project.name}</a> > 
	<a style ="color:#400040;" href=" @{Events.showSprints(event.sprint.project.getEntityId())}">Sprints</a> > 
	<a style ="color:#400040;" href="@{Events.showSprint(event.sprint.getEntityId())}">${event.sprint.name}</a> > 
	<a style ="color:#400040;" href="@{Events.showSprintEvents(event.sprint.getEntityId())}">Events</a> > 
	<a style ="color:#400040;" href="@{Events.showSprint(event.sprint.getEntityId())}">${event.name}</a> >
	Users
</h2><hr/>
#{/if}
#{else}
<h2>
	<a style ="color:#400040;" href="@{Projects.showProject(event.project.getEntityId())}">${event.project.name}</a> > 
	<a style ="color:#400040;" href="@{Events.showProjectEvents(event.project.getEntityId())}">Events</a> > 
	<a style ="color:#400040;" href="@{Events.showEvent(event.getEntityId())}">${event.name}</a> >
	Users
</h2><hr/>
#{/else}
Unassociated Users:
#{if associated}
Click on user to assoicate to this event<br/>
	#{list items: associated, as:'dev'}
		&nbsp;&nbsp;<a href="@{Events.associateDeveloper(event.id,dev.id)}"> ${dev.firstName} ${dev.middleName} ${dev.lastName}</a>
		<br/>
	#{/list}
#{/if}
#{else}
	&nbsp;&nbsp;There are no users unassociated to this event.
#{/else}
<br/><br/>
Associated Users:<br/>
#{if notassociated}
Click on user to remove from association to this event<br/>
#{list items: notassociated, as:'dev1'}
	&nbsp;&nbsp;<a href="@{Events.unAssociateDeveloper(event.id,dev1.id)}">${dev1.firstName} ${dev1.middleName} ${dev1.lastName}</a>
	<br/><br/>
#{/list}
#{/if}
#{else}
	&nbsp;&nbsp;There are no users that are associated to this event.
#{/else}
<br/>
<br/>
Unassociated Components:
#{if associatedComp}
	Click to associate a whole component:<br/>
	#{list items:associatedComp,as:'compo' }
		&nbsp;&nbsp;<a href="@{Events.associateComponent(event.getEntityId(),compo.id)}"> ${compo.name} </a>
		<br/>
	#{/list}
#{/if}
#{else}
	&nbsp;&nbsp;There are no components not associated to this event.
#{/else}
<br/>
<br/>
Associated Components:
#{if notassociatedComp}
	Click to remove association of a whole component<br/>
	#{list items:notassociatedComp,as:'compo1' }
		&nbsp;&nbsp;<a href="@{Events.unAssociateComponent(event.getEntityId(),compo1.id)}"> ${compo1.name}</a>
		<br/><br/>
	#{/list}
#{/if}
#{else}
	&nbsp;&nbsp;There are no components associated to this event.
#{/else}
